<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>尊博</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <link rel="shortcut icon" href="/favicon.ico" type="/image/x-icon">
    <link rel="apple-touch-icon-precomposed" href="">
    <link rel="stylesheet" href="source/src/css/main.css?v=210818"/>
   
</head>
<body>
<div class="index-page">
    <!-- 轮播图片 -->
    <div id="yx_slider" class="yx_slider">
        <ul class="slider-wrap" >
            <li>
                <a href="">
                    <img src="source/img/index/banner.jpg" alt="">
                </a>
            </li>
        </ul>
        <ul class="slide-trigger">
            <!--<li class="on"></li>
            <li class=""></li>-->
        </ul>
    </div>
    <!-- /轮播图片 -->

    <!-- 搜索 -->
    <!--<div class="search-box">
        <div class="search">
            <input type="text" class="search-inp diy-box"  placeholder="请输入您要搜索的商品">
            <i class="search-btn"></i>
        </div>
    </div>-->
    <!-- /搜索 -->

    <!-- 商品列表 -->
    <div class="cat-list" id="cat-list">
        <ul class="cat-list-ul clearfix" id="cat-list-ul">
           <!-- <li class="item">
                <a href="pages/shop_list.html">
                    <div class="pic">
                        <img src="source/img/index/cat1.jpg" alt="">
                    </div>
                    <h3>培养基</h3>
                </a>
            </li>-->
        </ul>
    </div>
    <!-- /商品列表 -->
</div>

<!--底部菜单-->
<div class="pub-nav">
    <ul>
        <li class="on">
            <a href="./index.html">
                <div class="index pic"></div>
                <div class="txt">首页</div>
            </a>
        </li>
        <li>
            <a href="pages/shop_cart.html">
                <div class="shopCart pic"></div>
                <div class="txt">购物车</div>
            </a>
        </li>
        <li>
            <a href="pages/me.html">
                <div class="me pic"></div>
                <div class="txt">我</div>
            </a>
        </li>
    </ul>
</div>
<!--/底部菜单-->

<script id="cat-list-ul-tpl" type="text/html">
    {{each ClassList as li i}}
    <li class="item">
        <a href="pages/shop_list.html?classcode={{li.Code}}">
            <div class="pic">
                <img src="source/img/index/cat{{i+1}}.jpg" alt="{{li.Name}}">
            </div>
            <h3>{{li.Name}}</h3>
        </a>
    </li>
    {{/each}}
</script>

<script src="source/plugin/zepto.min.js"></script>
<script src="source/plugin/artTemplate.js"></script>
<!--<script src="source/plugin/swipe-2.0.min.js"></script>-->
<script src="source/src/js/common.js"></script>
<script>
    $(function(){
        $.ajax({
            url:apiUrl+'/GetProdClass',
            type:'GET',
            data:{"json":JSON.stringify(user)},
//          dataType :'jsonp',
            success:function(datas){
               console.log(datas);
                var html = template('cat-list-ul-tpl', datas);
                $('#cat-list-ul').html(html);
            },
            error:function(datas){
                console.log(datas)
            }
        });
        /* slider('yx_slider');*/
    })
</script>
</body>
</html>